from DjangoDemo.scripts.Http_Management import Http_Management
from DjangoDemo.scripts.SiteID import Sites
from DjangoDemo.scripts.Token import Token


class c3_7:
    # 默认深圳
    def __init__(self, site_name):
        self.site_name = Sites.get_mac(site_name)
        self.token = Token()
        # 定义接口的 URI
        GET_JOURNEY_URI = "/rest/uninetwork-res/v1/position/subtree"
        # 配置 URL 和 Headers
        param = '''{
         "regionType":"site",
         "level":"1",
         "tenantId":"default-organization-id",
         "startTime":"1623906000000",
         "id":"/",
         "endTime":"1624078800000"
        }'''  # 不要站点参数

        self.r = Http_Management(self.token).get_site_message(GET_JOURNEY_URI, param, '6949a343-fbaa-4ff6-b98b-35c09a1dea66')


if __name__ == '__main__':
    now = c3_7("Shenzhen")
    print(now.r.json())
